package Demo2;

class Date{
    public int year;
    public int month;
    public int day;


    public void setDate(int y,int m,int d){
        year = y;
        month = m;
        day = d;
    }//只是形参自己赋值了，根本没有赋值到成员变量中

    public void printDate(){
        System.out.println(year +" "+month+" "+day);
    }

}



public class Test{


}
